const TerserWebpackPlugin = require('terser-webpack-plugin');
const CssMinimizerWebpackPlugin = require('css-minimizer-webpack-plugin');

module.exports = {
  mode: 'production',
  optimization: {
    minimize: true,
    minimizer: [
      new TerserWebpackPlugin({
        parallel: true,
        terserOptions: {
          compress: {
            // drop_console: true,
            // drop_debugger: true,
            pure_funcs: ['console.log']
          }
        }
      }),
      new CssMinimizerWebpackPlugin()
    ],
  },
};